<template>
	<view class="bg-w">
		<unio2o-tab @select="selectAct" :tabs="tabs" :selectIndex="selectIndex"></unio2o-tab>
		<scroll-view class="love-scroll" scroll-y="true">
			<view v-if="selectIndex == 0" class="pd30">
				<view class="mb30">
					<unio2o-tuan-love></unio2o-tuan-love>
				</view>
				<view class="mb30">
					<unio2o-tuan-love></unio2o-tuan-love>
				</view>
				<view class="mb30">
					<unio2o-tuan-love></unio2o-tuan-love>
				</view>
				<view class="mb30">
					<unio2o-tuan-love></unio2o-tuan-love>
				</view>
			</view>
			
			<view v-else class="pd30">
				<view class="mb30">
					<unio2o-store-love></unio2o-store-love>
				</view>
				
			</view>
			
		</scroll-view>
	</view>
</template>

<script>
	import unio2oTab from '@/components/base/tab/tab.vue';
	import unio2oTuanLove from '@/components/module/tuan/love.vue';
	import unio2oStoreLove from '@/components/module/store/love.vue';
	export default{
		components:{
			unio2oTab,
			unio2oTuanLove,
			unio2oStoreLove
		},
		data(){
			return {
				selectIndex:0,
				tabs:[
					{name:'收藏抢购'},
					{name:'收藏商家'}
				],
			}
		},methods:{
			selectAct(e){
				let index = parseInt(e);
			   this.selectIndex = index;		
			}
		}
	}
</script>

<style>
	.love-scroll{
		height: calc(100vh  - 100rpx);
	}
</style>